<?php

namespace App\Http\Resources;

use Illuminate\Http\Resources\Json\Resource;

class LessonResource extends Resource
{
    /**
     * Transform the resource into an array.
     *
     * @param  \Illuminate\Http\Request $request
     * @return array
     */
    public function toArray($request)
    {
        return [
            'id' => $this->id,
            'name' => $this->name,
            'course_name' => $this->course_name,
            'course_id' => $this->course_id,
            'category_name' => $this->category_name,
            'category_id' => $this->category_id,
            'grade_name' => $this->grade_name,
            'grade_id' => $this->grade_id,
//            'speaker_id' => $this->speaker_id,
//            'speaker_name' => $this->speaker_name,
            'start_time' => (string)$this->start_time,
            'end_time' => (string)$this->end_time,
            'room_id' => $this->room_id,
            'task_teacher_id' => $this->task_teacher_id,
            'task_teacher_name' => $this->task_teacher_name,
            'task_id' => $this->task_id,
            'replay_times' => $this->teplay_times,
            'online_number' => $this->online_number,
            'video_path' => $this->video_path,
            'status' => $this->status
        ];
    }
}
